package cn.mxb.logic.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.mxb.floor.pagination.Result;
import cn.mxb.logic.dao.MxbBingliDAO;
import cn.mxb.logic.entity.MxbBingli;
import cn.mxb.logic.service.IMxbBingliService;

@Service("mxbBingliService")
public class MxbBingliServiceImpl  implements IMxbBingliService {

	@Autowired
	private MxbBingliDAO mxbBingliDAO;
	
	
	@Override
	public MxbBingli findByProperty(String property, String value) {
		return mxbBingliDAO.findByProperty(property, value);
	}

	/**
	 * 分页
	 */
	@Override
	public Result<MxbBingli> find(MxbBingli MxbBingli, int page, int row) {
		return mxbBingliDAO.find(MxbBingli, page, row);
	}

	/**
	 * add
	 */
	@Override
	public MxbBingli add(MxbBingli MxbBingli) {
		return mxbBingliDAO.save(MxbBingli);
	}

	@Override
	public void delete(int id) {
		mxbBingliDAO.remove(MxbBingli.class,id);
	}
	@Override
	public void update(MxbBingli MxbBingli) {
		
	}
	
	@Override
	public List<MxbBingli> findListByProperty(String property, String value) {
		return mxbBingliDAO.findListByProperty(property, value);
	}
	@Override
	public List<MxbBingli>  findListByPropertyTwo(String property1,String value1,String property2,String value2){
		return mxbBingliDAO.findListByPropertyTwo(property1, value1,property2, value2);
	}
	/**
	 * 查询全部
	 */
	@Override
	public List<MxbBingli> findAllList() {
		return mxbBingliDAO.getAll(MxbBingli.class);
	}

	@Override
	public void updatetablebyproperty(String table, String field, String property, String value, int fieldvalue) {
		mxbBingliDAO.updatetablebyproperty(table, field, property, value, fieldvalue);
	}


	
}
